<!-- Teacher_XueBaSaiMoocChapter.html -->
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
	<meta name="format-detection" content="telephone=no, email=no, date=no, address=no">
	<title>mocc课程章节</title>
	<link rel="stylesheet" type="text/css" href="../../css/api.css" />
	<link rel="stylesheet" type="text/css" href="../../css/mui.min.css" />
	<link rel="stylesheet" type="text/css" href="../../css/weui.min.css" />
	<!-- <link rel="stylesheet" href="../../css/base.css"/> -->
	<link rel="stylesheet" href="../../css/CFNetPP_Base.css">
	<style type="text/css">
		.weui_panel .chapter_cell_icon{
			width:20px;
			height: 20px;
			background-size: 20px 20px;
			margin: 0;
		}
		.chapter_content_cell{
			padding-left: 30px;
		}
		.weui_panel .cell-right-arrow{
			width:20px;
			height: 20px;
			background-size: 20px 20px;
			margin: 0;
			float: right;
		}
		.arrow-down{
			background-image: url(../../image/arrow_down.png);
		}
		.arrow-right{
			background-image: url(../../image/arrow_right.png);
		}
		.doc_unstudy{
			background-image: url(../../image/doc_icon.png);
		}
		.doc_studying{
			background-image: url(../../image/doc_icon_studying.png);
		}
		.doc_studied{
			background-image: url(../../image/doc_icon_studied.png);
		}
		.video_unstudy{
			background-image: url(../../image/video_icon.png);
		}
		.video_studying{
			background-image: url(../../image/video_icon_studying.png);
		}
		.video_studied{
			background-image: url(../../image/video_icon_studied.png);
		}
		.richtext_unstudy{
			background-image: url(../../image/richtext_unstudy.png);
		}
		.richtext_studying{
			background-image: url(../../image/richtext_studying.png);
		}
		.richtext_studied{
			background-image: url(../../image/richtext_studied.png);
		}
		.ziyuan_unstudy{
			background-image: url(../../image/ziyuan_icon_unstudy.png);
		}
		.ziyuan_studying{
			background-image: url(../../image/ziyuan_icon_studying.png);
		}
		.ziyuan_studied{
			background-image: url(../../image/ziyuan_icon_studied.png);
		}
		.tests_untest{
			background-image: url(../../image/study_test.png);
		}
		.tests_tested{
			background-image: url(../../image/study_tested.png);
		}
		.taolun_normal{
			background-image: url(../../image/icon_taolun_normal.png);
		}
		.taolun_highlight{
			background-image: url(../../image/icon_taolun_highlight.png);
		}
		.downloaded{
			background-image: url(../../image/icon_download_finish.png);
		}
		.download_progress{
			background-color: rgba(4,190,2,0.25);
			height:100%;
			width:0;
			position:absolute;
			left: 0;
			top:0;
		}
		.chapter_title{
			font-size: 14px;
			padding-left: 10px;
			color: #393939;
		}
		.list_section_contnt{
			font-size: 16px;
			color: #454545;
			background-color: #f9f9f9;
			margin-bottom: 0;
		}
		.chapter_etime{
			margin-right: 10px;
			font-size: 14px;
		}
		.noSign{
			width: auto;
		}
		.loadFailure{
			width: auto;
		}
		.weui_panel .weui_btn{
			background-color: #1da4e8;
			border-color: #1da4e8;
			width: 44px;
			margin-left: 10px;
			border-radius: 2px;
			font-size: 12px;
			line-height: 24px;
		}
		.weui_panel .weui_btn:active{
			background-color: #0d94d8;
			border-color: #0d94d8;
			color: white;
		}
		.weui_panel .right-btn{
			float: right;
		}
		.weui_panel .right-btn-cancel{
			background-color: #CAC2C2;
			border-color: #CAC2C2;
		}
		.weui_panel .right-btn-cancel:active{
			background-color: #BAB2B2;
			border-color: #BAB2B2;
		}
		.weui_panel .weui_btn+.weui_btn{
			margin: 0;
		}
		.base_style_text_color .chapter_title{
			color: #18b4ed;
		}
		.base_style_text_color .chapter_time{
			color: #18b4ed;
		}
		.chapter_time{
			font-size: 12px;
			color: #1da4e8;
			padding-left: 10px;
		}
		.right-switch{
			float: right;
			margin-left: 10px;
		}
		.mui-switch-mini {
		    width: 42px;
		}
		.mui-switch {
			height: 25px;
		}
		.mui-switch .mui-switch-handle{
			width: 22px;
			height: 22px;
		}
		/*.mui-switch.mui-active {
		    border-color: #18b4ed;
		    background-color: #18b4ed;
		}*/
		.weui_cells_title{
			margin-top: 0px;
			margin-bottom: 0px;
		}
		.title-span{
			text-overflow:ellipsis;
			overflow:hidden;
			white-space:nowrap;
			/*width:-webkit-calc(100% - 52px); 
			width:-moz-calc(100% - 52px); 
			width:calc(100% - 52px); */
		}
		.footer-view{
			position: fixed;
			left: 0;
			bottom: 0;
			margin: 0;
			width: 100%;
			height: 50px;
			padding: 0;
			z-index: 99;
		}
		.footer-view .mui-btn-block{
			width: 100%;
			height: 100%;
			margin: 0;
			padding: 0;
			background-color: #18b4ed;
			border-color: #18b4ed;
			color: white;
			font-size: 16px;
		}
		.footer-view .mui-btn-block:active{
			background-color: #18b4ed;
		}
		.mui-btn, button{
			border-radius: 0px;
		    border-top-left-radius: 0px; 
		    border-top-right-radius: 0px; 
		    border-bottom-right-radius: 0px; 
		    border-bottom-left-radius: 0px; 
		} 
		.blank-div{
			height: 50px;
		}
		.add-btn-div{
			position: fixed;
			right: 100px;
			bottom: 50px;
			width: 80px;
			height: 80px;
		}
		.add-btn{
			width: 100%;
			height: 100%;
		}
		.weui_btn:after {
			border: 1px solid #18b4ed;
		}
		.weui_panel_hd:after {
		    border-bottom: 1px solid #ededed;
		    color: #ededed;
		    -webkit-transform: scaleY(.3);
		    transform: scaleY(.3);
		    left: 0;
		}
	</style>
	<style type="text/css">
		.chapter_cell_left_icon{
			height: 26px;
			margin-right: 10px;
			/*display:block;*/
		}
		.weui_cell_hd{
			height: 26px;
		}
		.weui_cell{
			padding: 15px;
		}
		.mui-table-view-cell.mui-collapse .mui-collapse-content{
			padding: 0;
		}
		.weui_cell:before {
			left: 0;
		}
		.big_chapter_div{
			margin-top: 10px;
		}
		.weui_panel{
			margin-top: 0;
		}
		.weui_cell{
			/*background-color: white;*/
		}
		.fen_ge_xian{
			padding: 1px;
		}
		.base_style_text_color .chapter_title{
			color: #18b4ed;
		}
		.chapter_title{
			line-height: 25px;
			/*margin-right: 35px;*/
		}
		/*.base_content_font {
			font-size: 16px;
		}
		.base_tag_font {
			font-size: 14px;
		}*/
		.base_title_color_font{
			background-color: #f9f9f9;
		}
		.base_content_color_font{
			/*background-color: #FFFFFF;*/
		}
		.img_margin_left_1{
			margin-left: 16px;
		}
		.img_margin_left_2{
			margin-left: 32px;
		}
		.img_margin_left_3{
			margin-left: 48px;
		}
		.img_margin_left_4{
			margin-left: 64px;
		}
		.mui-btn .btn-img{
			width: 22px;
		}
		.chapter-btn{
			width: 40px;
			height: 25px;
			padding: 2px;
			background-color: #18b4ed;
			border-color: #18b4ed;
			border-radius: 4px;
			color: white;
		}
		.chapter-btn:enabled:active{
			background-color: #08a4dd;
			border-color: #08a4dd;
		}
		.chapter-left-btn{
			float: left;
			margin-right: 10px;
		}
		.chapter-right-btn{
			/*float: right;*/
			margin-left: 50px;
		}
		.cell-right-div{
			width: 40px;
			float: right;
		}
		.cell-double-right-div{
			width: 90px;
			float: right;
		}
		.cell-double-left-div{
			margin-right: 90px;
		}
		.cell-left-div{
			margin-right: 40px;
		}
		.zhang-cell-content{
			height: 25px;
		}
		.zhang-left-div{
			overflow: hidden;
		}
		.zhang-span{
			overflow: hidden;
			text-overflow: -o-ellipsis-lastline;
			text-overflow: ellipsis;
			display: -webkit-box;
			-webkit-line-clamp: 1;
			-webkit-box-orient: vertical;
		}
		.mui-switch-mini {
		    width: 42px;
		}
		.mui-switch {
			height: 25px;
		}
		.mui-switch .mui-switch-handle{
			width: 22px;
			height: 22px;
		}
		/*.mui-switch.mui-active {
		    border-color: #18b4ed;
		    background-color: #18b4ed;
		}*/
		.close-cell-bg{
			background-color: #d6d6d6;
		}
		.footer-view{
			position: fixed;
			left: 0;
			bottom: 0;
			margin: 0;
			width: 100%;
			height: 50px;
			padding: 0;
			z-index: 99;
		}
		.footer-view .mui-btn-block{
			width: 100%;
			height: 100%;
			margin: 0;
			padding: 0;
			background-color: #18b4ed;
			border-color: #18b4ed;
			color: white;
			font-size: 16px;
		}
		.footer-view .mui-btn-block:active{
			background-color: #18b4ed;
		}
		.mui-btn, button{
			border-radius: 0px;
		    border-top-left-radius: 0px; 
		    border-top-right-radius: 0px; 
		    border-bottom-right-radius: 0px; 
		    border-bottom-left-radius: 0px; 
		} 
		.blank-div{
			height: 50px;
		}
		.add-btn-div{
			position: fixed;
			right: 100px;
			bottom: 50px;
			width: 80px;
			height: 80px;
		}
		.add-btn{
			width: 100%;
			height: 100%;
		}
		.mui-card {
		    box-shadow: 0px 0px 10px rgba(0,0,0,.1);
		}
		.section-chart{
			width: 80px;
			height: 80px;
		}
		.section-right-div{
			padding: 10px 20px 10px 20px;
			/*padding: 10px 20px 10px 20px; */
			/*height: 60px;*/
			float: right;
			width:-webkit-calc(100% - 80px); 
			width:-moz-calc(100% - 80px); 
			width:calc(100% - 80px); 
		}
		.section-title{
			display: -webkit-box;
			-webkit-box-orient: vertical;
			/*-webkit-line-clamp: 2;*/
			overflow: hidden;
			word-wrap: break-word;
		    white-space: normal; 
		    /*margin-right: 50px;*/
		}
		.section-subtitle{
			margin-top: 20px;
		}
		.cell-right-img{
			width: 20px;
		}
		.zhan-wei-div{
			height: 0;
		}
		.bottom-tiao{
			height: 20px;
		}
		.section-switch-div{
			position: absolute;
			right: 40px;
			/*top: 28px;*/
			top: 20px;
			z-index: 2;
		}
		.mui-btn, button, input[type=button], input[type=reset], input[type=submit]{
			border: 1px solid #18b4ed;
			border-radius: 4px;
		}
		.sub-chapter-chart{
			width: 57px;
			height: 57px;
			position: absolute;
			top: 0px;
			right: 42px;
		}
		.sub-chapter-chart-right{
			width: 57px;
			height: 57px;
			position: absolute;
			top: 0px;
			right: 0px;
		}
		.sub-chapter-chart-mask{
			width: 50px;
			height: 57px;
			position: absolute;
			top: 0px;
			right: 50px;
		}
		.sub-chapter-chart-right-mask{
			width: 50px;
			height: 57px;
			position: absolute;
			top: 0px;
			right: 0px;
		}
		.cell-double-left-div .sub-chapter-chart{
			right: 100px;
			margin-right: 10px;
		}
		.section-chart-mask{
			position: absolute;
			width: 80px;
			height: 80px;
			left: 15px;
			top: 11px;
			z-index: 2;
		}
		.chapter-chart-mask{
			position: absolute;
			width: 25px;
			height: 25px;
			top: 15px;
			right: 60px;
		}
		.cell-double-left-div .chapter-chart-mask{
			right: 100px;
			margin-right: 10px;
		}
		.chapter-bg-content{
			background-color: #f3f4f5;
		}
		.base-content .mui-content>.mui-card:first-child{
			margin-top: 10px;
		}
		.base-content .mui-card{
			margin: 10px;
			border-color: #d5d5d5;
			border-radius: 0px;
			border-width: 0px;
		}
		.mui-card .mui-table-view .mui-table-view-cell:first-child, .mui-card .mui-table-view .mui-table-view-divider:first-child{
			border-top-left-radius: 0px;
		    border-top-right-radius: 0px; 
		}
		.mui-navigate-right{
			background-color: white;
		}
		.mui-navigate-right:active{
			background-color: white;
		}
		.folder-content{
			background-color: #f9f9f9;
		}
		.chapter-folder-cell .sub-chapter-chart,.chapter-folder-cell .chapter-chart-mask {
			right: 96px;
		}
		.chapter-folder-cell .cell-right-img{
			margin-left: 14px;
		}
		.sub-chapter-f-cell .sub-chapter-chart,.sub-chapter-f-cell .chapter-chart-mask {
			right: 136px;
		}
		.sub-chapter-f-cell .cell-right-img{
			margin-left: 14px;
		}
		.drop-down-tap-div{
			position: absolute;
			right: 0;
			top: 0;
			height: 100%;
			width: 50px;
		}
		.sub-chapter-content-fdiv{
			padding: 0 1px;
		}
		.sub-chapter-content{
			border: 7px solid #ededed;
		}
		.sub-chapter-content-line{
			/*height: 1px;
			width: 100%;
			border-top: 1px solid #dedede;
			-webkit-transform: scaleY(.5);
		    transform: scaleY(.5);*/
		    height: 10px;
		    width: 100%;
		    background-size: 100% 100%;
		    background-image: url(../../image/chapter_background.png);
		}
		.sub-chapter-content-hide{
			display:none;
		}
		.weui_panel{
			background-color: #f3f4f5;
		}
		.jie-cell{
			background-color: #f9f9f9;
		}
		.cell-msg-right-div{
			width: 80px;
			font-size: 12px;
			color: #999;
		}
		.weui_panel:after{
			border-bottom: 0px solid #e5e5e5;
		}
	</style>
</head>
<body>
	<div class="noSign noDataDiv" hidden="hidden" id="noData">
		<img src="../../image/icon_img.png" width="60%">
		<p class="font16 top_15 base_dark_grey" >
			暂无数据
		</p>
	</div>
	<div class="loadFailure noInternetDiv" hidden="hidden" id="noNet">
		<img src="../../image/icon_img01.png" width="60%">
		<p class="" >
			数据加载失败
		</p>
		<p>
			请检查您的网络
		</p>
		<button type="button" class="mui-btn mui-btn-outlined" onclick="loadData()">
			重新加载
		</button>
	</div>
	<div class="weui_panel" style="margin-top: 0;">
		<div id="chapter_content">

			<!-- <div class="weui_panel_hd list_section_contnt">
				<span class="title-span">
					第一章第一章第一章第一章第一章
					第一章第一章第一章第一章第一章
				</span>
				<div class="mui-switch mui-switch-mini right-switch">
					<div class="mui-switch-handle"></div>
				</div>
			</div>
			<div class="weui_cell weui_cells_title">
				<span class="title-span">
					第一节第一节第一节第一节第一节
					第一节第一节第一节第一节第一节
				</span>
				<div class="mui-switch mui-switch-mini right-switch">
					<div class="mui-switch-handle"></div>
				</div>
			</div>
			<div id="" class="chapter_content_cell weui_cell video_cell "> 
				<p class="chapter_cell_icon tests_untest" alt=""><p>
            	<div class="download_progress"></div>
                <div class="weui_cell_hd"><img src=""></div>
                <div class="weui_cell_bd weui_cell_primary">
                    <label class="chapter_title">视频课程</label>
                    <label class="chapter_time">8分钟</label>
                </div>
                <div>
	                <a href="#" class="weui_btn weui_btn_mini right-btn">发布</a>
	                <div class="mui-switch mui-switch-mini mui-active right-switch">
						<div class="mui-switch-handle"></div>
					</div>
                	<a href="#" class="weui_btn weui_btn_mini right-btn">审阅</a>
                </div>
            </div>
            <div id="" class="chapter_content_cell weui_cell video_cell"> 
				<p class="chapter_cell_icon tests_untest" alt=""><p>
            	<div class="download_progress"></div>
                <div class="weui_cell_hd"><img src=""></div>
                <div class="weui_cell_bd weui_cell_primary">
                    <label class="chapter_title">视频课程</label>
                    <label class="chapter_time">8分钟</label>
                </div>
                <div>
	                <div class="mui-switch mui-switch-mini right-switch">
						<div class="mui-switch-handle"></div>
					</div>
                	<a href="#" class="weui_btn weui_btn_mini right-btn">审阅</a>
                </div>
            </div> -->
            <!--  -->
            <!-- <div class="mui-content chapter-bg-content">
				<div class="mui-card">
					<ul class="mui-table-view">
		            	<div class="section-chart-mask"></div>
						<li class="mui-table-view-cell mui-collapse mui-active">
							<a class="mui-navigate-right">
								<div class="section-right-div">
  									<p class="section-title base_dark_grey base_title_font">
										入库课程介绍
									</p>
  								</div>
  								<div id="chart" class="section-chart"></div>
							</a>
							<div class="mui-collapse-content">
								<div class="weui_cell weui_cells_title jie-cell">
									<span class="title-span">
										第一节第一节第一节第一节第一节
										第一节第一节第一节第一节第一节
									</span>
								</div>
								<div id="" class="chapter_content_cell weui_cell video_cell "> 
									<p class="chapter_cell_icon tests_untest" alt=""><p>
					            	<div class="download_progress"></div>
					                <div class="weui_cell_hd"><img src=""></div>
					                <div class="weui_cell_bd weui_cell_primary">
					                    <label class="chapter_title">
					                    	视频课程
					                    </label>
					                </div>
					                <div class="cell-msg-right-div">
					                	<div id="subChartLeft" class="sub-chapter-chart" style="background-color: red;"></div>
					                	<div id="subChartRight" class="sub-chapter-chart-right" style="background-color: green;"></div>
					                	<div class="sub-chapter-chart-mask" style="background-color: blue;"></div>
					                	<div class="sub-chapter-chart-right-mask" style="background-color: yellow;"></div>
					                </div>
					            </div> -->
								<!-- <div class="weui_cell sub_chapter_cell base_content_color_font sub-chapter-f-cell" >
									<div class="weui_cell_hd">
										<img src="../../image/03.png" alt="" class="chapter_cell_left_icon">
									</div>
									<div class="weui_cell_bd weui_cell_primary">
										<div class="cell-right-div">
											<button class="mui-btn chapter-btn chapter-left-btn">
							            		审阅
							            	</button>
						            	</div>
										<div class="base_grey base_tag_font cell-left-div">
						            		<span class="chapter_title">
							            		调查调查调查调查调查调查调查调查调查调查调查调查调查调查调查调查调查调查调查调查调查调查调查调查调查调查调查调查调查调查调查调查调查
						            		</span>
						            	</div>
									</div>
									<div id="" class="weui-cell__ft cell-right-down">
										<img class="cell-right-img" src="../../image/icon_bewrite_down.png">
									</div>
									<div class="drop-down-tap-div"></div>
								</div>
								<div class="weui_cell sub_chapter_cell base_content_color_font chapter-folder-cell" >
									<div class="weui_cell_hd">
										<img src="../../image/03.png" alt="" class="chapter_cell_left_icon">
									</div>
									<div class="weui_cell_bd weui_cell_primary">
										<div class="base_grey base_tag_font cell-left-div">
						            		<span class="chapter_title">
							            		调查
						            		</span>
						            	</div>
									</div>
									<div id="" class="weui-cell__ft cell-right-down">
										<img class="cell-right-img" src="../../image/icon_bewrite_down.png">
									</div>
									<div class="drop-down-tap-div"></div>
								</div> -->
							<!-- </div>
						</li>
					</ul>
				</div>
			</div> -->
            <!--  -->
		</div>
		<div class="bottom-tiao"></div>
	</div>
	<div class="blank-div" hidden="hidden"></div>
	<div class="footer-view" hidden="hidden">
		<button id="study_btn" type="button" onclick="onExamClick()" class="mui-btn mui-btn-block">批改考核</button>
	</div>
	<!-- <div id="menu_btn" class="add-btn-div" onclick="menuClick()">
		<img class="add-btn" src="../../image/add_btn.png">
	</div> -->
</body>
<script type="text/javascript" src="../../script/echarts.min.js"></script>
<script type="text/javascript" src="../../script/jquery.min.js"></script>
<script type="text/javascript" src="../../script/mui.min.js"></script>
<script type="text/javascript" src="../../script/api.js"></script>
<script type="text/javascript" src="../../script/MD5.js"></script>
<script type="text/javascript" src="../../script/requestTool.js"></script>
<!-- <script type="text/javascript" src="../../script/databaseOperation.js"></script> -->
<script type="text/javascript" src="../../script/study_courseTimeRecord.js"></script>
<script type="text/javascript" src="../../script/getToken.js"></script>
<script type="text/javascript">
	var chapterDatas = new Array();
	var currentSectionIndex = 0;
	apiready = function(){
	    loadData();
	    setRefreshHeader();
	    setupNotifi();
//	     setupExamBtn();
	}
//	function setupExamBtn(){
//		var pageParam = api.pageParam;
//		var examid = pageParam.examid;
//		if(examid != null && examid != ''){
//			$('.blank-div').show();
//			$('.footer-view').show();
//		}else{
//			$('.blank-div').hide();
//			$('.footer-view').hide();
//		}
//	}
	function setupNotifi(){
		api.addEventListener({
		    name: 'closeMenuNotifi'
		}, function(ret, err) {
		    api.closeFrame({
		        name: 'course_add_menu'
		    });
		    $('#menu_btn').show();
		});
	}
	function onExamClick(){
		api.openWin({useWKWebView:true,
		    name: 'Teacher_CourseTestMakingWindow',
		    url: 'Teacher_CourseTestMakingWindow.html',
		    pageParam: {
		        cid : api.pageParam.courseid,
		        pid : api.pageParam.planid,
		        examid : api.pageParam.examid
		    }
		});
	}
	//下拉刷新
	function setRefreshHeader() {
		api.setRefreshHeaderInfo({
			visible : true,
			bgColor : '#ccc',
			textColor : '#fff',
			textDown : '下拉刷新...',
			textUp : '松开刷新...',
			showTime : true
		}, function(ret, err) {
			loadData();
		});
	}
	function loadData(){
		api.showProgress({
		    style: 'default',
		    animationType: 'fade',
		    title: '加载中...',
		    text: '',
		    modal: false
		});
		var params = {
			cid : api.pageParam.courseid
		};
		cfnetppPOST(url_freeChapterUrl, params, true, function(data, status){
			api.hideProgress();
			api.refreshHeaderLoadDone();
			if (status == 'success') {
				if (data.status == true) {
					var chapterlist = data.data;
					if (chapterlist.constructor == Array && chapterlist.length > 0) {
						chapterDatas = chapterlist;
						setuplist(chapterlist);
						$('.noDataDiv').hide();
			    		$('.noInternetDiv').hide();
					}else{
						$('.noDataDiv').show();
		    			$('.noInternetDiv').hide();
					}
				}else{
					$('.noDataDiv').show();
	    			$('.noInternetDiv').hide();
				}
			}else{
				$('.noDataDiv').hide();
    			$('.noInternetDiv').show();
			}
		});
	}
	function setuplist(chapterlist){
		currentSectionIndex = 0;
		var chapterHtmlString = '';
		var pid = api.pageParam.planid;
		var chapterClassIndex = 0;
		var chapterSectionIndex = 0;
		var subChapterIndex = 0;
		$('#chapter_content').html('');
		for (var i = 0; i < chapterlist.length; i++) {
			var chapterData = chapterlist[i];
			if (chapterData.content_type == 'tag') {
				chapterClassIndex++;
			}else if(chapterData.content_type == 'part'){
				chapterSectionIndex++;
			}else{
				subChapterIndex++;
			}
			var chapterString = chapterHtml(chapterData, i, chapterClassIndex, chapterSectionIndex, subChapterIndex);
			if (chapterData.content_type == 'tag') {//章
				$('#chapter_content').append(chapterString);
				loadChartData(chapterData.id);
			}else{
				$('#sectionId'+currentSectionIndex).append(chapterString);
			}
			// chapterHtmlString += chapterHtml(chapterData, i, chapterClassIndex, chapterSectionIndex, subChapterIndex);
		}
		// $('#chapter_content').html(chapterHtmlString);
		loadSubChartData();
		addCellClick();
	}
	function loadChartData(chapterid){
		var params = {
			uid : $api.getStorage('cfnetppuid'),
			cid : api.pageParam.courseid
		};
		cfnetppPOST(url_XueBaSaiChart, params, true, function(data, status){
			if (status == 'success') {
				if (data.code == 200) {
					setupChart(chapterid, data.data);
				}else{
					setupChart(chapterid, null);
				}
			}else{
				setupChart(chapterid, null);
			}
		});
	}
	function loadSubChartData(){
		var params = {
			uid : $api.getStorage('cfnetppuid'),
			cid : api.pageParam.courseid
		};
		cfnetppPOST(url_XueBaSaiSubChart, params, true, function(data, status){
			if (status == 'success') {
				if (data.code == 200) {
					var subChartsData = data.data;
					if (subChartsData != null && subChartsData != undefined && subChartsData.constructor == Array && subChartsData.length > 0) {
						setupSubCharts(subChartsData);
					}
				}
			}
		});
	}
	function setupSubCharts(data){
		for (var i = data.length - 1; i >= 0; i--) {
			var subChartData = data[i];
			setupSubChart(subChartData);
			setupRightSubChart(subChartData);
		}
	}
	function setupChart(chapterid, data){
		var chartid = 'chart' + chapterid;
		var studiedNum;
		var unStudyNum;
		var percentage;
		var myChart = echarts.init(document.getElementById(chartid));
		// var maChart = echarts.init(document.getElementsByName('section_chart'));
		if (data == null) {
			studiedNum = 0;
			unStudyNum = 1;
			percentage = '0%';//百分比
		}else{
			var stuyNum = data.xnum.toString();
			var allStudent = data.znum.toString();
			studiedNum = parseFloat(stuyNum);
			var allNum = parseFloat(allStudent);
			if (allNum == 0) {
				allNum = 1;
			}
			if (allNum < studiedNum) {
				allNum = studiedNum;
			}
			unStudyNum = allNum - studiedNum;
			percentageNum = (studiedNum / allNum) * 100;
			percentage = percentageNum.toFixed(0) + '%'; 
		}
		myChart.setOption({
			title: {
		        text: percentage,
		        x: 'center',
		        y: 'center',
		        textStyle:{
			        //文字颜色
			        color:'#666',
			        //字体风格,'normal','italic','oblique'
			        fontStyle:'normal',
			        //字体粗细 'normal','bold','bolder','lighter',100 | 200 | 300 | 400...
			        fontWeight:'bold',
			        //字体系列
			        fontFamily:'sans-serif',
			        //字体大小
			　　　　 fontSize:14
			    }
		    },
			series: [
			    {
			        type:'pie',
			        radius: ['70%', '100%'],
			        avoidLabelOverlap: true,
			        label: {
			            normal: {
			                show: true,
			                position: 'center'
			            },
			            emphasis: {
			                show: true
			            }
			        },
			        labelLine: {
			            normal: {
			                show: true
			            }
			        },
			        data:[
			            {value:studiedNum},
			            {value:unStudyNum}
			        ],
			        color:['#18b4ed', '#d0d0d0']
			    }
			]
		});
	}
	function setupSubChart(subChartData){
		var chartid = 'subChartLeft' + subChartData.id;
		var myChart = echarts.init(document.getElementById(chartid));
		var studiedNum;
		var unStudyNum;
		var percentage;
		if (subChartData == null) {
			studiedNum = 0;
			unStudyNum = 1;
			percentage = "0%";
		}else{
			var xueNum = subChartData.xnum.toString();
			var allStudent = subChartData.people.toString();
			studiedNum = parseFloat(xueNum);
			var allNum = parseFloat(allStudent);
			if (allNum == 0) {
				allNum = 1;
			}
			if (allNum < studiedNum) {
				allNum = studiedNum;
			}
			unStudyNum = allNum - studiedNum;
			percentageNum = (studiedNum / allNum) * 100;
			percentage = percentageNum.toFixed(0) + '%';
		}
		myChart.setOption({
			title: {
		        text: percentage,
		        x: 'center',
		        y: 'center',
		        textStyle:{
			        //文字颜色
			        color:'#666',
			        //字体风格,'normal','italic','oblique'
			        fontStyle:'normal',
			        //字体粗细 'normal','bold','bolder','lighter',100 | 200 | 300 | 400...
			        fontWeight:'bold',
			        //字体系列
			        fontFamily:'sans-serif',
			        //字体大小
			　　　　 fontSize:8
			    }
		    },
			series: [
			    {
			        type:'pie',
			        radius: ['40%', '60%'],
			        avoidLabelOverlap: true,
			        label: {
			            normal: {
			                show: true,
			                position: 'center'
			            },
			            emphasis: {
			                show: true
			            }
			        },
			        labelLine: {
			            normal: {
			                show: true
			            }
			        },
			        data:[
			            {value:studiedNum},
			            {value:unStudyNum}
			        ],
			        color:['#18b4ed', '#d0d0d0']
			    }
			]
		});
	}
	function setupRightSubChart(subChartData){
		var chartid = 'subChartRight' + subChartData.id;
		var myChart = echarts.init(document.getElementById(chartid));
		var studiedNum;
		var unStudyNum;
		var percentage;
		if (subChartData == null) {
			studiedNum = 0;
			unStudyNum = 1;
			percentage = "0%";
		}else{
			var kunNum = subChartData.knum.toString();
			var allStudent = subChartData.people.toString();
			studiedNum = parseFloat(kunNum);
			var allNum = parseFloat(allStudent);
			if (allNum == 0) {
				allNum = 1;
			}
			if (allNum < studiedNum) {
				allNum = studiedNum;
			}
			unStudyNum = allNum - studiedNum;
			percentageNum = (studiedNum / allNum) * 100;
			percentage = percentageNum.toFixed(0) + '%';
		}
		var currentChartData;
		// if (studiedNum > unStudyNum) {
		// 	currentChartData = [
	 //            {value:studiedNum},
	 //            {value:unStudyNum,selected:true}
	 //        ];
		// }else{
		// 	currentChartData = [
	 //            {value:studiedNum,selected:true},
	 //            {value:unStudyNum}
	 //        ];
		// }
		currentChartData = [
            {value:studiedNum},
            {value:unStudyNum}
        ];
		myChart.setOption({
			title: {
		        // text: percentage,
		        x: 'center',
		        y: 'center',
		        textStyle:{
			        //文字颜色
			        color:'#666',
			        //字体风格,'normal','italic','oblique'
			        fontStyle:'normal',
			        //字体粗细 'normal','bold','bolder','lighter',100 | 200 | 300 | 400...
			        fontWeight:'bold',
			        //字体系列
			        fontFamily:'sans-serif',
			        //字体大小
			　　　　 fontSize:8
			    }
		    },
			series: [
			    {
			        type:'pie',
			        radius: ['0%', '60%'],
			        avoidLabelOverlap: true,
			        label: {
			            normal: {
			                show: true,
			                position: 'center'
			            },
			            emphasis: {
			                show: true
			            }
			        },
			        labelLine: {
			            normal: {
			                show: true
			            }
			        },
			        data:currentChartData,
			        color:['#fb0006', '#18b4ed']
			    }
			]
		});
	}
	function addCellClick(){
		//阅卷按钮
		$('.test_btn').unbind('click');
		$('.test_btn').click(function(event){
		 
			event.stopPropagation();
			var vid = $(this).attr('vid');
			var bewrite = $(this).attr('bewrite');
			var is_dis_bewrite = $(this).attr('is_dis_bewrite');
			var title = $(this).attr('title');
			api.openWin({useWKWebView:true,
			    name: 'Teacher_TestMarkingManageWindow',
			    url: '../Teacher_Teach/Teacher_TestMarkingManageWindow.html',
			    pageParam: {
			        vid: vid,
			        pid: api.pageParam.planid,
			        cid: api.pageParam.courseid,
			        bewrite: bewrite,
			        is_dis_bewrite: is_dis_bewrite,
			        title: title,
			        type:0//mocc
			    }
			});
			
		});
		//发布/取消发布按钮
		$('.pub_btn').unbind('click');
		$('.pub_btn').click(function(event){
			var vid = $(this).attr('vid');
			var isclose = $(this).attr('isclose');
			var pubClass = $(this).attr('pubClass');
			var pubStatus = 1;//发布
			if (isclose == 1) {//已发布
				pubStatus = 0;//取消发布
				$(this).removeClass('mui-active');
			}else{
				$(this).addClass('mui-active');
			}
			pubZhangJie(vid, pubStatus, pubClass);
			event.stopPropagation();
		});
		//点击cell
		$('.chapter_content_cell').unbind('click');
		$('.chapter_content_cell').click(function(){
			$('.chapter_content_cell').removeClass('base_style_text_color');
			$(this).addClass('base_style_text_color');
			var index = $(this).attr('index');
			var chapterData = chapterDatas[parseInt(index)];
			pushNextWindow(chapterData);
		});
		//点击章
		$('.zhang_cell').unbind('click');
		$('.zhang_cell').click(function(){
			var chapterClassName = $(this).attr('value');
			if ($(this).hasClass('hideAll')) {
				$('.' + chapterClassName).show(0);
				$(this).removeClass('hideAll');
			}else{
				$('.' + chapterClassName).hide(0);
				$(this).addClass('hideAll');
			}
		});
		//点击节
		$('.jie_cell').unbind('click');
		$('.jie_cell').click(function(){
			var chapterSectionName = $(this).attr('value');
			$('.' + chapterSectionName).toggle(0);
		});
	}
	function pushNextWindow(chapter){
		var contentType = chapter.content_type;
		var pushParams = '';
		var winName = '';
		var title = decodeURIComponent(chapter.cdetailtitle);
		var pid = api.pageParam.planid;
		var vid = chapter.id;
		var cid =  api.pageParam.courseid;
		var rid = chapter.rid;
		var bewrite = chapter.bewrite;
		var other = chapter.other;
		var is_encr = chapter.is_encr;
		var baidu_cloud_id_url = chapter.baidu_cloud_id_url;
		var baidu_cloud_id = chapter.baidu_cloud_id;
		if (contentType == 'doc') {//文档
			if (is_encr == 1) {//加密
				var CFBaiDuDoc = api.require('CFBaiDuDoc');
		        CFBaiDuDoc.startDocActivityForResult({
		            docId:baidu_cloud_id,//文档ID
		            title:title,//文档标题
		            token:"TOKEN",//文档token，离线加载时不验证。
		            host:"BCEDOC",//文档所属站点
		            docType:"doc" //文档类型，可取值为ppt 和 doc
		        },function(){
		        });
		        return;
			}else{
				pushParams = {
					title : title,
					doc : rid,
					pushType : 'teacher'
				};
				winName = 'studyCourseDoc';
			}
		}else if(contentType == 'video'){//视频
			var connectionType = api.connectionType;
            if (connectionType != 'wifi' && connectionType != 'none') {
            	api.confirm({
                    title: '提示',
                    msg: '您当前处于移动数据网络下，是否继续播放',
                    buttons: ['确定', '取消']
                }, function(ret, err) {
                    var index = ret.buttonIndex;
                    if (index == 1) {//确定
                        // toPlayVideo(rid, title);
                        pushToBaiDuPlayer(is_encr, baidu_cloud_id_url, rid, title);
                    }
                });
            }else{
            	// toPlayVideo(rid, title);
            	pushToBaiDuPlayer(is_encr, baidu_cloud_id_url, rid, title);
            }
			return;
		}else if(contentType == 'richtext'){//富文本
			pushParams = {
				cdetailtitle : title,
		    	other : other,
		    	vid : vid,
		    	cid : cid,
		    	pid : pid,
		    	richtextType : 2,
		    	bewrite : bewrite
			};
			winName = 'studyCourseRichtextNew';
		}else if(contentType == 'tests'){//测验
			api.openWin({useWKWebView:true,
			    name: 'Teacher_Freecourse_TestChapter',
			    url: 'Teacher_Freecourse_TestChapter.html',
			    pageParam: {
			        id : vid,
					pid : pid,
					cid : cid,
					title : title,
					rid : rid,
					bewrite : bewrite,
					is_dis_bewrite : chapter.is_dis_bewrite,
					type:0//mocc
			    }
			});
			// pushParams = {
			// 	chapterid : vid,
			// 	pid : pid,
			// 	cid : cid,
			// 	title : title,
			// 	rid : rid
			// };
			// winName = 'New_student_study_freecourse_TestExam';
			// api.openWin({useWKWebView:true,
			//     name: winName,
			//     url: '../Study/' + winName + '.html',
			//     bounces: false,
			//     pageParam: pushParams,
			//     bgColor: '#fff',
			//     slidBackEnabled :false
			// });
			return;
		}else if(contentType == 'discuss'){//讨论
			pushParams = {
			    chapterid : vid,
				pid : pid,
				cid : cid,
				title : title,
				rid : rid,
				bewrite :bewrite,
				type :0
		    };
		    winName = 'Student_Mocc_DiscussChapterWindow';
		}else if(contentType == 'hdresource'){//互动资源
			if(api.connectionType == 'none'){
				api.toast({
			    	msg: '暂无网络，无法访问该内容'
				});
				return;
		  	}
		    winName = 'student_study_freecourse_interactiveNew';
		    pushParams = {
		    	pid : pid,
				cid : cid,
				id : vid,
				type : 1
		    };
		} else{
			return;	
		}
		api.openWin({useWKWebView:true,
		    name: winName,
		    url: '../Study/' + winName + '.html',
		    bounces: false,
		    pageParam: pushParams,
		    bgColor: '#fff'
		});
	}
	function toPlayVideo(path, title){
		// var h = api.winWidth * 3 / 4;
		var h = 240;
		api.openFrame({
		    name: 'HTML5VideoPlayer',
		    url: '../Teacher_Teach/HTML5VideoPlayer.html',
		    rect: {
		        x: 0,
		        y: 0,
		        w: 'auto',
		        h: h
		    },
		    pageParam:{
		    	videoUrl : path
		    },
		    reload : true
		});
		return;
		var videoPlayer = api.require('videoPlayer');
		videoPlayer.play({
		    path : path,
		    texts: {
		        head: {
		            title: title
		        }
		    },
		    styles : {
		    	head : {
		    		backSize : 24,
		    		backImg : 'widget://image/vp_back.png',
		    		setSize : 24,
		    		setImg : 'widget://image/vp_more.png'
		    	},
		    	foot :{
		    		playSize : 24,
		    		playImg : 'widget://image/vp_play.png',
		    		pauseImg : 'widget://image/vp_pause.png',
		    		nextSize : 24,
		    		nextImg : 'widget://image/vp_next.png'
		    	}
		    }
		}, function(ret, err) {
		});
	}
	function chapterHtml(chapter, index, chapterClassIndex, chapterSectionIndex, subChapterIndex){
		var chapterTime = chapter.ctime;
		if (chapterTime == 0) {
			chapterTime = '';
		}else{
			chapterTime += '分钟';
		}
		var contentType = chapter.content_type;
 		var chapterClassName = 'chapter' + chapterClassIndex;
 		var chapterSectionName = chapterClassName + chapterSectionIndex;
 		var keshiClass = " " + chapterClassName + " " + chapterSectionName;
 		var title = decodeURIComponent(chapter.cdetailtitle);
 		var id = chapter.id;
 		var isclose = chapter.isclose;
 		var pubClass1 = 'pubClass' + chapterClassIndex;
 		var pubClass2 = pubClass1 + chapterSectionIndex;
 		var pubClass3 = pubClass1 + " " + pubClass2;
 		if (chapterSectionIndex == 0) {
 			pubClass3 = pubClass1;
 		}
 		var pubClass4 = pubClass2 + subChapterIndex;
 		var pubClass5 = pubClass3 + " " + pubClass4;
 		// var pubHtml = '<a href="#" id="pubBtn'+id+'" vid="'+id+'" index="'+index+'" isclose="'+isclose+'" class="pub_btn weui_btn weui_btn_mini right-btn">发布</a>';
 		var pubHtml = '<div pubClass="'+pubClass5+'" href="#" id="pubBtn'+id+'" vid="'+id+'" index="'+index+'" isclose="'+isclose+'" class="pub_btn mui-switch mui-switch-mini right-switch '+pubClass5+'">'+
						'<div class="mui-switch-handle"></div>'+
					'</div>';
		var muiActiveClass = '';
 		if (isclose == 1) {
 			// pubHtml = '<a href="#" id="pubBtn'+id+'" vid="'+id+'" index="'+index+'" isclose="'+isclose+'" class="pub_btn weui_btn weui_btn_mini right-btn right-btn-cancel">取消发布</a>';
 			pubHtml = '<div pubClass="'+pubClass5+'" href="#" id="pubBtn'+id+'" vid="'+id+'" index="'+index+'" isclose="'+isclose+'" class="pub_btn mui-switch mui-switch-mini mui-active right-switch '+pubClass5+'">'+
						'<div class="mui-switch-handle"></div>'+
					'</div>';
			muiActiveClass = ' mui-active';
 		}
 		var testHtml = '';
 		var studyStatusClass = '';
 		if (contentType == 'tag') {//章
 			currentSectionIndex++;
 			var activeStatus = currentSectionIndex == 1 ? " mui-active" : "";
 			return '<div chapterid="'+id+'" class="mui-content chapter-bg-content">'+
				'<div class="mui-card">'+
					'<ul class="mui-table-view">'+
		            	'<div chapterid="'+id+'" class="section-chart-mask"></div>'+
						'<li id="section_tap'+id+'" class="mui-table-view-cell mui-collapse'+activeStatus+'">'+
							'<a class="mui-navigate-right">'+
								'<div class="section-right-div">'+
  									'<p class="section-title base_dark_grey base_title_font">'+
										title+
									'</p>'+
  								'</div>'+
  								'<div id="chart'+id+'" name="section_chart" class="section-chart"></div>'+
							'</a>'+
							'<div id="sectionId'+currentSectionIndex+'" class="weui_cell mui-collapse-content">'+
							'</div>'+
						'</li>'+
					'</ul>'+
				'</div>'+
			'</div>';
 		// 	return '<div id="'+id+'" class="weui_panel_hd list_section_contnt zhang_cell" value="'+chapterClassName+'"><span class="title-span">'+
 		// 			title+
 		// 			'</span><div pubClass="'+pubClass1+'" href="#" id="pubBtn'+id+'" vid="'+id+'" index="'+index+'" isclose="'+isclose+'" class="pub_btn mui-switch mui-switch-mini right-switch '+pubClass1+muiActiveClass+'">'+
			// 			'<div class="mui-switch-handle"></div>'+
			// 		'</div>'+
			// 	// '<span class="cell-right-arrow arrow-right"></span>\
			// '</div>';
		}else if(contentType == 'part'){//节
			return "<div class='weui_cell part-cell jie_cell "+chapterClassName+"' value='"+chapterSectionName+"'>"+
                "<div class='weui_cell_bd weui_cell_primary'>"+
                    "<p class='part-title'>"+title+"</p>"+
                "</div>"+
            "</div>";
			// return '<div class="weui_cell jie_cell weui_cells_title '+chapterClassName+'" value="'+chapterSectionName+'"><span class="title-span">'+title+'</span><div pubClass="'+pubClass3+'" href="#" id="pubBtn'+id+'" vid="'+id+'" index="'+index+'" isclose="'+isclose+'" class="pub_btn mui-switch mui-switch-mini right-switch '+pubClass3+muiActiveClass+'">'+
			// 			'<div class="mui-switch-handle"></div>'+
			// 		'</div>'+'</div>';
		}else if(contentType == 'doc'){//文档
			keshiClass = ' doc_cell' + keshiClass;
			studyStatusClass = ' doc_unstudy';
		}else if(contentType == 'video'){//视频
			studyStatusClass = ' video_unstudy';
		}else if (contentType == 'richtext'){//富文本
			studyStatusClass = ' richtext_unstudy';
		}else if (contentType == 'tests'){//测验
			testHtml = '<a href="#" vid="'+id+'" "is_dis_bewrite="'+chapter.is_dis_bewrite+'"bewrite="'+chapter.bewrite+'"  title="'+chapter.title+'" index="'+index+'" class="test_btn weui_btn weui_btn_mini right-btn">批卷</a>';
			studyStatusClass = ' tests_untest';
		}else if(contentType == 'discuss'){//讨论
			studyStatusClass = ' taolun_normal';
		}else if(contentType == 'hdresource'){//互动资源
			studyStatusClass = ' ziyuan_unstudy';
		}else{
			return '';
		}
		return '<div id="'+id+'" index="'+index+'" class="chapter_content_cell weui_cell'+keshiClass+'">'+
				'<p class="chapter_cell_icon'+studyStatusClass+'" alt=""><p>'+
            	'<div class="download_progress"></div>'+
                '<div class="weui_cell_hd"><img src=""></div>'+
                '<div class="weui_cell_bd weui_cell_primary">'+
                    '<label class="chapter_title">'+title+'</label>'+
                    // '<label class="chapter_time">'+chapterTime+'</label>'+
                '</div>'+
                '<div class="cell-msg-right-div">'+
                	'<div id="subChartLeft'+id+'" class="sub-chapter-chart"></div>'+
                	'<div id="subChartRight'+id+'" class="sub-chapter-chart-right"></div>'+
                	'<div class="sub-chapter-chart-mask"></div>'+
                	'<div class="sub-chapter-chart-right-mask"></div>'+
                '</div>'+
            '</div>';
	}
	
//	//测验阅卷
//	function openTest(){
//	}
	//发布章节
	function pubZhangJie(vid, pubStatus, pubClass){
		var pubParams = {
			jid : $api.getStorage('cfnetppjxid'),
			uid : $api.getStorage('cfnetppuid'),
			cid : api.pageParam.courseid,
			vid : vid,
			isclose : pubStatus
		};

		var pubClassArr = pubClass.split(" ");
		var lastPubClass = pubClassArr[pubClassArr.length - 1];//最后一个
		var previousPubClass = pubClassArr[pubClassArr.length - 2];//倒数第二个
		cfnetppPOST(url_closeOfOpenChapter, pubParams, false, function(data, status){
			
			SendBusinessOperationsLogNotifi('Mocc课程列表页', '028', pubParams, pubParams, '', data, 'Mocc课程发布关闭章节接口', '006-01')
			if (status == 'success') {
				if (data.code == 200) {
					api.toast({
					    msg: '操作成功'
					});
					if (pubStatus == 0) {//取消发布
						// $('#pubBtn' + vid).attr('isclose', '0');
						// $('#pubBtn' + vid).removeClass('right-btn-cancel');
						// $('#pubBtn' + vid).text('发布');
						// $('#pubBtn' + vid).removeClass('mui-active');
						$('.'+lastPubClass).attr('isclose', '0');
						$('.'+lastPubClass).removeClass('mui-active');
						var allCloseStatus = 0;
						var j = 0;
						$('.' + previousPubClass).each(function(){
							if($(this).attr('isclose') == '1'){
								if (j > 0) {
									allCloseStatus++;
								}
								j++;
							}
						});
						if (allCloseStatus == 0) {
							// $('.'+previousPubClass).attr('isclose', '0');
							// $('.'+previousPubClass).removeClass('mui-active');
						}
					}else{
						// $('#pubBtn' + vid).attr('isclose', '1');
						// $('#pubBtn' + vid).addClass('right-btn-cancel');
						// $('#pubBtn' + vid).text('取消发布');
						// $('#pubBtn' + vid).addClass('mui-active');
						$('.'+lastPubClass).attr('isclose', '1');
						$('.'+lastPubClass).addClass('mui-active');
						var allCloseStatus = 0;
						var j = 0;
						$('.' + previousPubClass).each(function(){
							if($(this).attr('isclose') == '0'){
								if (j > 0) {
									allCloseStatus++;
								}
								j++;
							}
						});
						if (allCloseStatus == 0) {
							// $('.'+previousPubClass).attr('isclose', '1');
							// $('.'+previousPubClass).addClass('mui-active');
						}
					}
				}else{
					api.toast({
					    msg: '操作失败，请重试'
					});
					//操作失败则复原
					if (pubStatus == 0) {//取消发布
						$('#pubBtn' + vid).addClass('mui-active');
					}else{
						$('#pubBtn' + vid).removeClass('mui-active');
					}
				}
			}else{
				api.toast({
				    msg: '操作失败，请重试'
				});
				//操作失败则复原
				if (pubStatus == 0) {//取消发布
					$('#pubBtn' + vid).addClass('mui-active');
				}else{
					$('#pubBtn' + vid).removeClass('mui-active');
				}
			}
		});
	}
	function menuClick(){
		$('#menu_btn').hide();
		api.openFrame({
		    name: 'course_add_menu',
		    url: '../Study/course_add_menu.html',
		    rect: {
		        x: 0,
		        y: 0,
		        w: 'auto',
		        h: 'auto'
		    },
		    pageParam: {
		        name: api.pageParam
		    }
		});
	}
</script>
</html>